package com.shen.function;

import java.util.function.Function;
import java.util.function.Predicate;

public class Demo02 {
    public static void main(String[] args) {
        /**
         * Predicate 传入一个类型值，返回一个boolean类型值
         */
        Predicate predicate = new Predicate<String>() {
            @Override
            public boolean test(String o) {
                return o.isEmpty();
            }
        };
      /*  Predicate predicate=(str)->{return false;};*/


        /**
         * 测试
         */
        System.out.println(predicate.test(""));//false


    }
}

